
#############################
# Descriptives of Scale Items
#############################

# Exploratory analysis ---------------------------------------------------------
EA_desc_items_pos<-IrtEa%>%
  dplyr::select(.,int_pos_id_YES_1,
                int_pos_id_NO_1,
                int_pos_id_YES_2,
                int_pos_id_NO_2,
                int_pos_id_YES_3,
                int_pos_id_NO_3,
                int_pos_id_YES_4,
                int_pos_id_NO_4,
                int_pos_id_YES_5,
                int_pos_id_NO_5,
                int_pos_id_YES_6,
                int_pos_id_NO_6,
                int_pos_id_YES_7,
                int_pos_id_NO_7,
                int_pos_id_YES_8,
                int_pos_id_NO_8)%>% 
  describe() %>% 
  dplyr::select(n, mean, sd, median, min, max) %>% 
  dplyr::rename(N=n, Mean=mean, SD=sd, Mdn = median, Min=min, Max=max)%>%
  knit_print(skimr_digits = 2)

stargazer(EA_desc_items_pos, type="latex", digits = 2, digits.extra = 0, summary = F, style = "apsr")
EA_desc_items_neg<-IrtEa%>%
  dplyr::select(.,
                int_neg_id_YES_1,
                int_neg_id_NO_1,
                int_neg_id_YES_2,
                int_neg_id_NO_2,
                int_neg_id_YES_3,
                int_neg_id_NO_3,
                int_neg_id_YES_4,
                int_neg_id_NO_4,
                int_neg_id_YES_5,
                int_neg_id_NO_5,
                int_neg_id_YES_6,
                int_neg_id_NO_6,
                int_neg_id_YES_7,
                int_neg_id_NO_7,
                int_neg_id_YES_8,
                int_neg_id_NO_8)%>% 
  describe() %>% 
  dplyr::select(n, mean, sd, median, min, max) %>% 
  dplyr::rename(N=n, Mean=mean, SD=sd, Mdn = median, Min=min, Max=max)%>%
  knit_print(skimr_digits = 2)

stargazer(EA_desc_items_neg, type="latex", digits = 2, digits.extra = 0, summary = F, style = "apsr")

# Confirmatory analysis --------------------------------------------------------
CA_desc_items_pos<-IrtEa%>%
  dplyr::select(.,int_pos_id_YES_1,
                int_pos_id_NO_1,
                int_pos_id_YES_2,
                int_pos_id_NO_2,
                int_pos_id_YES_3,
                int_pos_id_NO_3,
                int_pos_id_YES_4,
                int_pos_id_NO_4,
                int_pos_id_YES_5,
                int_pos_id_NO_5,
                int_pos_id_YES_6,
                int_pos_id_NO_6,
                int_pos_id_YES_7,
                int_pos_id_NO_7,
                int_pos_id_YES_8,
                int_pos_id_NO_8)%>% 
  describe() %>% 
  dplyr::select(n, mean, sd, median, min, max) %>% 
  dplyr::rename(N=n, Mean=mean, SD=sd, Mdn = median, Min=min, Max=max)%>%
  knit_print(skimr_digits = 2)

stargazer(CA_desc_items_pos, type="latex", digits = 2, digits.extra = 0, summary = F, style = "apsr")

CA_desc_items_neg<-IrtEa%>%
  dplyr::select(.,
                int_neg_id_YES_1,
                int_neg_id_NO_1,
                int_neg_id_YES_2,
                int_neg_id_NO_2,
                int_neg_id_YES_3,
                int_neg_id_NO_3,
                int_neg_id_YES_4,
                int_neg_id_NO_4,
                int_neg_id_YES_5,
                int_neg_id_NO_5,
                int_neg_id_YES_6,
                int_neg_id_NO_6,
                int_neg_id_YES_7,
                int_neg_id_NO_7,
                int_neg_id_YES_8,
                int_neg_id_NO_8)%>% 
  describe() %>% 
  dplyr::select(n, mean, sd, median, min, max) %>% 
  dplyr::rename(N=n, Mean=mean, SD=sd, Mdn = median, Min=min, Max=max)%>%
  knit_print(skimr_digits = 2)

stargazer(CA_desc_items_neg, type="latex", digits = 2, digits.extra = 0, summary = F, style = "apsr")

# Whole Sample--------------------------------------------------------
Irt<-bind_rows(IrtEa, IrtCa) 

desc_items_pos<-Irt%>%
  dplyr::select(.,int_pos_id_YES_1,
                int_pos_id_NO_1,
                int_pos_id_YES_2,
                int_pos_id_NO_2,
                int_pos_id_YES_3,
                int_pos_id_NO_3,
                int_pos_id_YES_4,
                int_pos_id_NO_4,
                int_pos_id_YES_5,
                int_pos_id_NO_5,
                int_pos_id_YES_6,
                int_pos_id_NO_6,
                int_pos_id_YES_7,
                int_pos_id_NO_7,
                int_pos_id_YES_8,
                int_pos_id_NO_8)%>% 
  describe() %>% 
  dplyr::select(n, mean, sd, median, min, max) %>% 
  dplyr::rename(N=n, Mean=mean, SD=sd, Mdn = median, Min=min, Max=max)%>%
  knit_print(skimr_digits = 2)

stargazer(desc_items_pos, type="latex", digits = 2, digits.extra = 0, summary = F, style = "apsr")

desc_items_neg<-Irt%>%
  dplyr::select(.,
                int_neg_id_YES_1,
                int_neg_id_NO_1,
                int_neg_id_YES_2,
                int_neg_id_NO_2,
                int_neg_id_YES_3,
                int_neg_id_NO_3,
                int_neg_id_YES_4,
                int_neg_id_NO_4,
                int_neg_id_YES_5,
                int_neg_id_NO_5,
                int_neg_id_YES_6,
                int_neg_id_NO_6,
                int_neg_id_YES_7,
                int_neg_id_NO_7,
                int_neg_id_YES_8,
                int_neg_id_NO_8)%>% 
  describe() %>% 
  dplyr::select(n, mean, sd, median, min, max) %>% 
  dplyr::rename(N=n, Mean=mean, SD=sd, Mdn = median, Min=min, Max=max)%>%
  knit_print(skimr_digits = 2)

stargazer(desc_items_neg, type="latex", digits = 2, digits.extra = 0, summary = F, style = "apsr")


